
namespace Crux.Core.Reflections;
/// <inheritdoc/>
public class AssemblyFinder(params Assembly[] assemblies) : IAssemblyFinder
{
    #region private fields
    private IReadOnlyCollection<Assembly> assemblies = assemblies;
    #endregion  private fields

    #region implements IAssemblyFinder
    /// <inheritdoc/>
    public IEnumerable<Assembly> GetAssemblies()
    {
        if (!assemblies.Any())
        {
            return assemblies = AppDomain.CurrentDomain.GetAssemblies();
        }

        return assemblies;
    }
    #endregion implements IAssemblyFinder


}